<script setup>
import store from '@/utils/store.js'
import MetaTable from "@/components/MetaTable.vue"
import {extCols} from "@/utils/tool.js"

const data = store.typeMappingData
const exts = store.typeMappingTargets

const cols = [
  {type: 'input'  , label: '名称', prop: 'name'   , width: '100', input: {disabled: true}},
  {type: 'input'  , label: '类型', prop: 'code'   , width: '100', input: {disabled: true}},
  {type: 'color'  , label: '颜色', prop: 'color'  , width: '60', align: 'center'},
  {type: 'switch' , label: '启用', prop: 'enabled', width: '60', align: 'center'},
  {type: 'input'  , label: '源类型', prop: 'sourceTypes'},
  ...extCols(exts),
]
</script>

<template>
  <meta-table :data :cols/>
</template>